package org.mall.modules.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.mall.common.api.vo.CommonResult;
import org.mall.modules.shop.entity.ShopClerkRelationShip;

import java.util.List;

/**
 * @Description: 店铺店员关联关系
 * @Author: jeecg-boot
 * @Date:   2019-10-30
 * @Version: V1.0
 */
public interface IShopClerkRelationShipService extends IService<ShopClerkRelationShip> {

    /**
     * 解除店员与店铺关联关系
     * @param shopIds
     * @param asList
     * @return
     */
    int removeByShopIdsAndClerkIds(String shopIds, List<String> asList);
    /**
     * 商铺-通过商铺id和店员id删除与店员的关系
     * @param shopId
     * @param clerkId
     */
    void deleteOneShopClerk(String shopId, String clerkId);


    /**
     * 商铺批量-通过商铺id和店员id删除与店员的关系
     * @param shopIds
     * @param clerkIds
     */
    void deleteListShopClerk(String shopIds, List<String> clerkIds);
    /**
     * 给店铺分配店员，，，，，分配之前，先把店员原先和店铺的关系删除
     * @param clerkrId
     * @return
     */
    boolean deleteAllReaOfClerk(String clerkrId);


    ShopClerkRelationShip getOneByUserIdAndShopId(@Param("id") String userId, @Param("shopId") String shopId);

    CommonResult<Object> sellerIsInShop(String sellerId, String shopId);

    List<String> getListByShopId(String s);
}
